import service from "@/api/axios";


// 获取用户信息列表
export const getUserListApi = (data) => {
    return service({
        url: "/userManage",
        method: "GET",
        params: data
    })
}
// 修改用户信息
export const updateUserApi = (data) => {
    return service({
        url: "/userManage",
        method: "POST",
        data
    })
}
// 修改用户密码信息
export const updatePwdApi = (data) => {
    return service({
        url: "/userManage/updatePwd",
        method: "POST",
        data
    })
}
// 添加用户信息
export const addUserApi = (data) => {
    return service({
        url: "/userManage",
        method: "PUT",
        data
    })
}
// 删除用户信息
export const deleteUserApi = (id) => {
    return service({
        url: `/userManage/${id}`,
        method: "DELETE",
    })
}
// 绑定借阅人
export const bindingPersonApi = (userId, personId) => {
    return service({
        url: `/userManage/bindingPerson/${userId}?personId=${personId}`,
        method: "PUT",
    })
}
// 解绑借阅人
export const unBindingPerson = (userId, personId) => {
    return service({
        url: `/userManage/unBindingPerson/${userId}?personId=${personId}`,
        method: "DELETE",
    })
}